{include file="common/_meta"}

<title>添加用户 - H-ui.admin v3.0</title>
<meta name="keywords" content="H-ui.admin v3.0,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
<meta name="description" content="H-ui.admin v3.0，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>
<body>
<article class="cl pd-20">
    <form action="" method="post" class="form form-horizontal" id="form-member-add">

        <input type="hidden" name="status" value="1"/>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>比赛场次：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text disabled" value="{$id}" placeholder="" id="id" name="id">
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>重置比赛记录：</label>
            <div class="formControls col-xs-8 col-sm-9 radio-box">
                <input type="radio" class="radius" name="reset" value="0" checked/>不重置
                <input type="radio" class="radius" name="reset" value="1"/>重置比赛记录
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">开始时间:</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text disabled" value="{$start_time}"  placeholder="" id="start_time" name="start_time">
            </div>
        </div>


        <!--<div class="row cl">-->
        <!--<label class="form-label col-xs-4 col-sm-3">附件：</label>-->
        <!--<div class="formControls col-xs-8 col-sm-9"> <span class="btn-upload form-group">-->
        <!--<input class="input-text upload-url" type="text" name="uploadfile" id="uploadfile" readonly nullmsg="请添加附件！" style="width:200px">-->
        <!--<a href="javascript:void();" class="btn btn-primary radius upload-btn"><i class="Hui-iconfont">&#xe642;</i> 浏览文件</a>-->
        <!--<input type="file" multiple name="file-2" class="input-file">-->
        <!--</span> </div>-->
        <!--</div>-->
        <!--<div class="row cl">-->
        <!--<label class="form-label col-xs-4 col-sm-3">所在城市：</label>-->
        <!--<div class="formControls col-xs-8 col-sm-9"> <span class="select-box">-->
        <!--<select class="select" size="1" name="city">-->
        <!--<option value="" selected>请选择城市</option>-->
        <!--<option value="1">北京</option>-->
        <!--<option value="2">上海</option>-->
        <!--<option value="3">广州</option>-->
        <!--</select>-->
        <!--</span> </div>-->
        <!--</div>-->
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">备注：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <!--onKeyUp="textarealength(this,100)" -->
                <textarea name="beizhu" cols="" rows="" class="textarea"  placeholder="最少输入10个字符" ></textarea>
                <p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
            </div>
        </div>

        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;保存并开始比赛&nbsp;&nbsp;">
            </div>
        </div>

    </form>
</article>

{include file="common/_footer"}

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
<script type="text/javascript" src="/lib/jquery.validation/1.14.0/validate-methods.js"></script>
<script type="text/javascript" src="/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script type="text/javascript">
    $(function(){

        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });

        $("#form-member-add").validate({
            rules:{
                id:{
                    required:true,
                    minlength:2,
                    maxlength:16
                }
            },
            onkeyup:false,
            focusCleanup:true,
            success:"valid",
            submitHandler:function(form){
                $(form).ajaxSubmit(function (e) {
                    if (e.status==1){


                        //尝试直接打开
                        var url = "{:url('game/game_start','gameinfo',false)}/id/"+e.id;
                        parent.layer.open({
                            type: 2,
                            area: ['1400px', '800px'],
                            fix: false, //不固定
                            maxmin: true,
                            shade:0.4,
                            title: "游戏开始",
                            content: url
                        });

                        //关闭创建
                        var index = parent.layer.getFrameIndex(window.name);
                        parent.$('.btn-refresh').click();
                        parent.layer.close(index);

                    }else{
                        $.Huimodalalert(e.info?e.info:"服务异常,请联系管理员",2000);
                    }
                });

            }
        });
    });
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>